Repository navigation
Stabilize ontology data-graph query-budget ITs against one-off cache misses - #36843
Conversation
…ail the ontology query budget NativeOntologyDataGraphIT.statementCountDoesNotGrowWithConceptsOrAssets and NativeOntologyDataGraphContextIT.loadedContextReadsDoNotGrowWithConceptsOrAssets count every SELECT a request runs. A single read can also pay for a cache miss outside the graph (in a failing CI run, the reader's ownership lookup added EntityRelationshipDAO and UserDAO reads: 23 -> 25), which failed the merge queue repeatedly. Each case now takes the fewest reads over three; real growth in graph queries still shows on every read and still fails.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟢 Low risk · The three-read minimum only adjusts flaky query-budget assertions, leaving application behavior and interfaces unchanged. Stabilizes two ontology data-graph integration tests by comparing the fewest SELECT reads over three runs instead of a single count, so a one-off cache miss no longer fails the query-budget assertion while real graph query growth still does. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
🚦 Removed from the merge queue —
|
Describe your changes:
Two ontology data-graph ITs keep knocking PRs out of the merge queue (and fail on
mainpushes):NativeOntologyDataGraphContextIT.loadedContextReadsDoNotGrowWithConceptsOrAssets(14 commits since Oct 30)NativeOntologyDataGraphIT.statementCountDoesNotGrowWithConceptsOrAssets(8 commits since Oct 30)Cause: both count every SELECT a graph request runs and assert the wide ontology runs no more than the narrow one. A single read can also pay for a cache miss outside the graph. In a failing CI run (23 → 25), the graph's own queries were identical; the two extra were the reader's ownership lookup (
EntityRelationshipDAO.findToRelationshipsForEntityWithCondition,UserDAO.findReferencesByIds).Fix (tests only): each case now takes the fewest reads over three (
NativeOntologyGraphScanProbe.fewestReads,NativeOntologyDataGraphContextIT.fewestPageReads). A real growth in graph queries shows on every read and still fails; a one-off cache miss no longer does.Tests
Both classes run 3× on MySQL + Elasticsearch and 3× on Postgres + Elasticsearch + Redis: 10/10 passing each run.
Type of change: